The present invention relates in general to data processing systems, and in particular, to the execution of out-of-order load and store instructions in a processor.
In order to increase the operating speed of microprocessors, architectures have been designed and implemented that allow for the out-of-order execution of instructions within the microprocessor. An advantage of out-of-order execution of instructions is that it allows load miss latencies to be hidden while useful work is being performed. However, traditionally, load and store instructions have not been executed out of order because of the very nature of their purpose. For example, if a store instruction is scheduled to be executed in program order prior to a load instruction, but the processor executes these two instructions out of order so that the load instruction is executed prior to the store instruction, and these two instructions are referring to the same memory space, there is a likelihood that the load instruction will load incorrect, or old, data since the store instruction was not permitted to complete prior to the load instruction.
Nevertheless, the present invention takes advantage of the foregoing situation to increase the throughput of instructions.
The present invention increases the throughput of instructions by executing load instructions early in order to hide the latency of the memory subsystem. To ensure that the load instruction receives the correct data, the load address and size are compared to any older store instructions that may have occurred which have not been written to the cache/memory subsystem. Additionally, when a load hit store condition occurs, if the store data is known, it is determined whether this data can be forwarded to the load instruction even if the data has not yet been committed to memory.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention.